from sqlalchemy import Column, ForeignKey, DateTime
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.oracle import VARCHAR2, NUMBER
from app.db.base import Base

# Program Table
class Program(Base):
    __tablename__ = 'PROGRAM'
    __table_args__ = {'schema': 'IARO_COOP_ADMIN'}

    program_id = Column(NUMBER, primary_key=True)
    start_year = Column(VARCHAR2(20))
    program_length = Column(NUMBER)
    program_value_estimate = Column(NUMBER(30, 2))
    program_code = Column(VARCHAR2(30))

    sponsorships = relationship("Sponsorship", back_populates="program")
